Prevent DXL attributes from refreshing in baselines

I don't want my DXL attributes to be refreshed in baselines. How can I avoid this refreshing.

I thougt this one helps.
 

if (!null obj && attrDXLName != ""){
  if ( !isBaseline( module( obj ) ) ) {
    obj.attrDXLName = sOut ""
  }
  else{
    //What shall I write here?
  }

 


Is it the right direction, or do I need a different solution?

Thank you!

 


GaborMoizes - Thu Feb 02 10:24:19 EST 2012

Re: Prevent DXL attributes from refreshing in baselines
llandale - Thu Feb 02 17:24:35 EST 2012

The values of attr-DXL is not saved with the module, so if a baseline doesn't refresh then you see nothing.

You will need to copy all the attr-DXL attributes, perhaps "Baselined_xyz", then change the definition of these new attribute removing the "Attr-DXL" property. Setting the values can be done in various ways, perhaps have some simple DXL script that reads the attr-DXL and sets the "Baselined" copy. Or it seems if you just read all the values for all objects you can then change the properties and the values are retained.

-Louie

Re: Prevent DXL attributes from refreshing in baselines
GaborMoizes - Fri Feb 03 02:34:50 EST 2012

llandale - Thu Feb 02 17:24:35 EST 2012
The values of attr-DXL is not saved with the module, so if a baseline doesn't refresh then you see nothing.

You will need to copy all the attr-DXL attributes, perhaps "Baselined_xyz", then change the definition of these new attribute removing the "Attr-DXL" property. Setting the values can be done in various ways, perhaps have some simple DXL script that reads the attr-DXL and sets the "Baselined" copy. Or it seems if you just read all the values for all objects you can then change the properties and the values are retained.

-Louie

Hi Louie,

Thank you for your answer. But this solution needs an extra step before every baselining. I can't persuade the users to do it before they create a baseline, especially when they use baseline sets and they baseline several modules in one step.
Is there an other, more user-friendly solution?

Gabor

Re: Prevent DXL attributes from refreshing in baselines
rain_bow - Fri Feb 03 07:58:40 EST 2012

GaborMoizes - Fri Feb 03 02:34:50 EST 2012
Hi Louie,

Thank you for your answer. But this solution needs an extra step before every baselining. I can't persuade the users to do it before they create a baseline, especially when they use baseline sets and they baseline several modules in one step.
Is there an other, more user-friendly solution?

Gabor

It appears that you need to think outside the "DOORS" and find another way of reaching your goals since you can't re-engineer DOORS features.

Re: Prevent DXL attributes from refreshing in baselines
llandale - Fri Feb 03 10:46:55 EST 2012

GaborMoizes - Fri Feb 03 02:34:50 EST 2012
Hi Louie,

Thank you for your answer. But this solution needs an extra step before every baselining. I can't persuade the users to do it before they create a baseline, especially when they use baseline sets and they baseline several modules in one step.
Is there an other, more user-friendly solution?

Gabor

I'm going to think outloud; hopefully someone will get inspired and fix the holes.

Lets keep a sibling attribute with up-to-date values for all these attr-DXL.

Each such important Attr-DXL has a sibling text (non-attr-dxl) attribute, lets say the sibling attribute's name is always "Baseline_" and the name of the attrDXL. e.g. you have attrDXL "dxlTrace" and sibling "Baseline_dxlTrace".

These attr-DXL look like this:

Module mod = current
string NameAttrBase = "Baseline_" attrDXLName
 
if (baseline(mod))
{              // We are displaying a Baseline
   obj.attrDXLName = probeAttr_(obj, NameAttrBase)  // Display the value when baseline occurred, don't re-calculate
   halt
}
        // At this point we are displaying the current version of the module
string Results = whatever I want to display for this AttrDXL.
 
AttrDef adBaseline = find(mod, NameAttrBase)
if !null adBaseline and canModify(obj.NameAttrBase))
{              // Module edit, or shared and section locked.  Update the Sibling value.
   obj.NameAttrBase = Results
}
obj.attrDXLName = Results


I'm thinking that perhaps you want a project-wide post-module-open trigger that when the module is open for Edit it looks through all the attributes, finds all the attr-DXL, and if that attr-DXL has a baseline sibling it then queries that attr-DXL value for all objects, automatically forcing an update to the baseline value. Since you cannot baseline a module unless its open Edit, I think you have solved your problem.

I see that you will be forced to save a module whenever it's open Edit, and often when open Shared, even if you make no actual changes.

-Louie

I think this falls into that gap "OutOfBox" but not yet "OutOfDOORS".

Re: Prevent DXL attributes from refreshing in baselines
GaborMoizes - Wed Feb 08 08:11:37 EST 2012

llandale - Fri Feb 03 10:46:55 EST 2012

I'm going to think outloud; hopefully someone will get inspired and fix the holes.

Lets keep a sibling attribute with up-to-date values for all these attr-DXL.

Each such important Attr-DXL has a sibling text (non-attr-dxl) attribute, lets say the sibling attribute's name is always "Baseline_" and the name of the attrDXL. e.g. you have attrDXL "dxlTrace" and sibling "Baseline_dxlTrace".

These attr-DXL look like this:

Module mod = current
string NameAttrBase = "Baseline_" attrDXLName
 
if (baseline(mod))
{              // We are displaying a Baseline
   obj.attrDXLName = probeAttr_(obj, NameAttrBase)  // Display the value when baseline occurred, don't re-calculate
   halt
}
        // At this point we are displaying the current version of the module
string Results = whatever I want to display for this AttrDXL.
 
AttrDef adBaseline = find(mod, NameAttrBase)
if !null adBaseline and canModify(obj.NameAttrBase))
{              // Module edit, or shared and section locked.  Update the Sibling value.
   obj.NameAttrBase = Results
}
obj.attrDXLName = Results


I'm thinking that perhaps you want a project-wide post-module-open trigger that when the module is open for Edit it looks through all the attributes, finds all the attr-DXL, and if that attr-DXL has a baseline sibling it then queries that attr-DXL value for all objects, automatically forcing an update to the baseline value. Since you cannot baseline a module unless its open Edit, I think you have solved your problem.

I see that you will be forced to save a module whenever it's open Edit, and often when open Shared, even if you make no actual changes.

-Louie

I think this falls into that gap "OutOfBox" but not yet "OutOfDOORS".

You are a genius. And so I am (nearly), because the same solution started to outline in my head. :)

Maybe this addition helps solving the forced save issue.
 

if(obj.NameAttrBase "" != Results "") obj.NameAttrBase = Results

 


Thank You!

 

Re: Prevent DXL attributes from refreshing in baselines
llandale - Wed Feb 08 15:43:51 EST 2012

GaborMoizes - Wed Feb 08 08:11:37 EST 2012

You are a genius. And so I am (nearly), because the same solution started to outline in my head. :)

Maybe this addition helps solving the forced save issue.
 

if(obj.NameAttrBase "" != Results "") obj.NameAttrBase = Results

 


Thank You!

 

Well, they say that "Brilliant minds think alike". However:
  • That's not really true as "Brilliant" folks are those that think useful thoughts nobody else has yet.
  • Lots of other kinds of minds often think alike!
  • My routine reponse to that statement is "So do ours"! lol

If you set an attr value that does not change it then there is no History, no change dates, and the module internally is not marked as "changed". e.g. for a boolean attribute, the following does not force a module save:
  • bool Value = obj."NameBooleanAttr"
  • obj."NameBooleanAttr" = Value

I was suggesting that a module is forced saved if you edit and look at section 3.2 and the attr-DXL re-calculates something in 3.1.

-Louie